async function setMagicUrl(url) {
	return await chrome.storage.local.set({
		GoGoUrl: url
	});
}

async function getMagicUrl() {
	return (await chrome.storage.local.get('GoGoUrl')).GoGoUrl;
}

// ture:开启使用魔法聊天|false:关闭使用魔法聊天|'repeat':开启聊天复用
async function setChatHubWithMagic(user) {
	return await chrome.storage.local.set({
		ChatHubWithMagic: user
	});
}
// ture|false|'repeat'
async function getChatHubWithMagic() {
	return (await chrome.storage.local.get('ChatHubWithMagic')).ChatHubWithMagic;
}

//设置上次创建的聊天
async function setLastChatJson(json) {
	return await chrome.storage.local.set({
		LastChatJson: json
	});
}

//获取上次创建的聊天
async function getLastChatJson() {
	return (await chrome.storage.local.get('LastChatJson')).LastChatJson;
}

//获取上次聊天聊到的消息id次数
async function getLastChatInvocationId(){
    return (await chrome.storage.local.get('LastChatInvocationId')).LastChatInvocationId;
}
//设置上次聊天聊到的消息id次数
async function setLastInvocationId(invocationId){
    return await chrome.storage.local.set({
		LastChatInvocationId: invocationId
	});
}